/**
 * 优化面板样式
 */

.optimization-panel {
  padding: 16px;
  background: #f5f5f5;
  min-height: calc(100vh - 200px);
}

.panel-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e8e8e8;
}

.analyzing-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

/* 建议列表样式 */
.suggestions-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px;
  background: white;
  border-radius: 4px;
}

.suggestions-list {
  background: white;
  border-radius: 4px;
}

.suggestion-item {
  padding: 16px;
  margin-bottom: 8px;
  background: white;
  border: 1px solid #f0f0f0;
  border-radius: 4px;
  transition: all 0.3s;
}

.suggestion-item:hover {
  border-color: #1890ff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.suggestion-item.applied {
  background: #f6ffed;
  border-color: #b7eb8f;
  opacity: 0.7;
}

.suggestion-preview {
  margin-top: 12px;
  padding: 8px;
  background: #fafafa;
  border-radius: 4px;
  font-size: 13px;
}

/* 对比预览样式 */
.compare-container {
  padding: 16px;
  background: white;
  border-radius: 4px;
}

.content-preview {
  max-height: 300px;
  overflow-y: auto;
  padding: 12px;
  background: #fafafa;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.6;
}

.full-content-preview {
  max-height: 500px;
  overflow-y: auto;
  padding: 12px;
  background: #fafafa;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.optimized-content-preview {
  padding: 16px;
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  border-radius: 4px;
  max-height: 600px;
  overflow-y: auto;
  white-space: pre-wrap;
  line-height: 1.8;
}

/* 评分卡片样式 */
.ant-statistic-content {
  font-size: 24px;
  font-weight: 600;
}

.ant-progress-text {
  font-size: 12px;
}

/* 标签样式 */
.ant-tag {
  margin: 2px 4px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .optimization-panel {
    padding: 8px;
  }
  
  .suggestions-toolbar {
    flex-direction: column;
    gap: 12px;
  }
  
  .compare-container .ant-col {
    margin-bottom: 16px;
  }
  
  .ant-drawer {
    width: 100% !important;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.suggestion-item {
  animation: fadeIn 0.3s ease-in-out;
}

/* 自定义滚动条 */
.content-preview::-webkit-scrollbar,
.full-content-preview::-webkit-scrollbar,
.optimized-content-preview::-webkit-scrollbar {
  width: 6px;
}

.content-preview::-webkit-scrollbar-track,
.full-content-preview::-webkit-scrollbar-track,
.optimized-content-preview::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.content-preview::-webkit-scrollbar-thumb,
.full-content-preview::-webkit-scrollbar-thumb,
.optimized-content-preview::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.content-preview::-webkit-scrollbar-thumb:hover,
.full-content-preview::-webkit-scrollbar-thumb:hover,
.optimized-content-preview::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* 高亮效果 */
.highlight-success {
  background-color: #f6ffed;
  padding: 2px 4px;
  border-radius: 2px;
}

.highlight-warning {
  background-color: #fff7e6;
  padding: 2px 4px;
  border-radius: 2px;
}

.highlight-error {
  background-color: #fff1f0;
  padding: 2px 4px;
  border-radius: 2px;
}